package com.ls.lserp.modules.setting.dao;

import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.modules.common.entity.Material;
import com.ls.lserp.modules.common.entity.UploadFile;
import com.ls.lserp.modules.setting.entity.Ognization;
import com.ls.lserp.modules.sys.entity.Brand;


/**
  * @ClassName: MaterialDao
  * @Description: 物料接口
  * 
  * @author 
  * @date 2016年1月19日 上午9:20:34
  *
  */

@MyBatisDao
public interface MaterialDao extends CrudDao<Material> {

	
	/**
	  * @Title: getByName
	  * @Description: 查重
	  * @param @param Material
	  * @param @return
	  * @return Material 
	  * @throws
	  */
	
	public Material getByCode(Material material);
	
	/**
	  * @Title: saveUploadFile
	  * @Description: 上传图片
	  * @param @param material
	  * @param @return
	  * @return int 
	  * @throws
	  */
	
	public int saveUploadFile(UploadFile  uploadFile);
	
    /**
      * @Title: searchFileId
      * @Description: 查询图片Id
      * @param @param material
      * @param @return
      * @return List<Material> 
      * @throws
      */
    
    public List<UploadFile> searchFileId(UploadFile  uploadFile);
    
	/**
	  * @Title: findMaterialOgnizationList
	  * @Description: 物料来源机构一览
	  * @param @return
	  * @return List<Ognization> 
	  * @throws
	  */
	public List<Ognization> findMaterialOgnizationList(Material material);
	
	/**
	 * 供货商物料表
	 * @param material
	 * @return
	 */
	public int insertVenderMaterial(Material material);
	
	/**
	 * 供货商物料表
	 * @param material
	 * @return
	 */
	public int updateVenderMaterial(Material material);
	/**
	 * 品牌列表
	 * @param Brand
	 * @return
	 */
	public List<Brand> findBrandList();
	/**
	 * 获取机构
	 * @param material
	 * @return
	 */
	public Ognization getMaterialOgnization(Material material);
	/**
	 * 供货商物料表
	 * @param material
	 * @return
	 */
	public int insertiInventoryMaterial(Material material);
}
